﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Storage.Mapping.AppStorage
{
    [Serializable]
    public class AppStorageMapping
    {
        /// <summary>
        /// 
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string AppKey { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessage ="请输入应用名称")]
        public string Name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessage ="请输入根目录")]
        [RegularExpression(@"^[a-zA-Z]+$",ErrorMessage ="只能输入字母")]
        public string RootDirectory { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid Creator { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int WaterType { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public byte[] WaterImage { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int Location { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        [RegularExpression(@"[0-8]",ErrorMessage ="水印位置只能是0-8的数值")]
        public int Position { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [RegularExpression(@"^0|100|([1-9]\d*)$",ErrorMessage ="只能输入0-100的数子")]
        public int Opacity { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string FontText { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string FontFamily { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string FontColor { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int FontSize { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int FontRotate { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int FontFill { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string SecretKey { get; set; }

    }
}
